# Contributor: TBK <alpine@jjtc.eu>
# Maintainer: TBK <alpine@jjtc.eu>
pkgname=rcon
pkgver=0.6
pkgrel=0
pkgdesc="Source RCON client for command line"
url="https://github.com/n0la/rcon"
# s390x blocked by failing tests
arch="all !s390x"
license="BSD-2-Clause"
makedepends="bash-completion cmake glib-dev libbsd-dev check-dev"
subpackages="$pkgname-doc $pkgname-bash-completion"
source="$pkgname-$pkgver.tar.gz::https://github.com/n0la/rcon/archive/$pkgver.tar.gz
	no-werror.patch
	"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DINSTALL_BASH_COMPLETION=ON
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="45e8d8b8a5fce933529a3c55ee285340bd820bc01340f607b1f8a70344f2b333f78b6a9b28ebc25c4c229366a194c4524d7ed81e19838c4b1c233800e7bfa541  rcon-0.6.tar.gz
a421b0cba054df504de63814ed711004e5806d7670b34179d9bd5751bb47e1e1dc3f47162d26e6276d0972c493de0bd48565f2f46d8d9b62e8c8bfaac6bf6054  no-werror.patch"
